package charupaixu;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Random;

public class text01 {
    public static void main(String[] args) {
        Random random = new Random();
        int arr[]=new int[80000];
        for (int i = 0; i < 80000; i++) {
            arr[i]=random.nextInt();
        }
        Date date1 = new Date();
        SimpleDateFormat f1 = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
        System.out.println(f1.format(date1));
        crpx(arr);
        Date date2 = new Date();
      //  SimpleDateFormat f2 = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
        System.out.println(f1.format(date2));
    }
    static void crpx(int arr[]){
        int val=0;
        int ind=0;
        for (int i = 1; i < arr.length; i++) {
            ind=i-1;
            val=arr[i];
            while (ind>=0&&val<arr[ind]){
                arr[ind+1]=arr[ind];
                ind--;
            }
            arr[ind+1]=val;
        }
    }
}
